package com.ruoyi.whzj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.whzj.mapper.WhTaskcomplaintMapper;
import com.ruoyi.whzj.domain.WhTaskcomplaint;
import com.ruoyi.whzj.service.IWhTaskcomplaintService;
import com.ruoyi.common.core.text.Convert;

/**
 * 任务投诉Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-12-30
 */
@Service
public class WhTaskcomplaintServiceImpl implements IWhTaskcomplaintService 
{
    @Autowired
    private WhTaskcomplaintMapper whTaskcomplaintMapper;

    /**
     * 查询任务投诉
     * 
     * @param id 任务投诉ID
     * @return 任务投诉
     */
    @Override
    public WhTaskcomplaint selectWhTaskcomplaintById(String id)
    {
        return whTaskcomplaintMapper.selectWhTaskcomplaintById(id);
    }

    /**
     * 查询任务投诉列表
     * 
     * @param whTaskcomplaint 任务投诉
     * @return 任务投诉
     */
    @Override
    public List<WhTaskcomplaint> selectWhTaskcomplaintList(WhTaskcomplaint whTaskcomplaint)
    {
        return whTaskcomplaintMapper.selectWhTaskcomplaintList(whTaskcomplaint);
    }

    /**
     * 新增任务投诉
     * 
     * @param whTaskcomplaint 任务投诉
     * @return 结果
     */
    @Override
    public int insertWhTaskcomplaint(WhTaskcomplaint whTaskcomplaint)
    {
        whTaskcomplaint.setCreateTime(DateUtils.getNowDate());
        return whTaskcomplaintMapper.insertWhTaskcomplaint(whTaskcomplaint);
    }

    /**
     * 修改任务投诉
     * 
     * @param whTaskcomplaint 任务投诉
     * @return 结果
     */
    @Override
    public int updateWhTaskcomplaint(WhTaskcomplaint whTaskcomplaint)
    {
        whTaskcomplaint.setUpdateTime(DateUtils.getNowDate());
        return whTaskcomplaintMapper.updateWhTaskcomplaint(whTaskcomplaint);
    }

    /**
     * 删除任务投诉对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWhTaskcomplaintByIds(String ids)
    {
        return whTaskcomplaintMapper.deleteWhTaskcomplaintByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除任务投诉信息
     * 
     * @param id 任务投诉ID
     * @return 结果
     */
    @Override
    public int deleteWhTaskcomplaintById(String id)
    {
        return whTaskcomplaintMapper.deleteWhTaskcomplaintById(id);
    }
}
